package laki.service;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Map;

import com.opensymphony.xwork2.ActionContext;

public class LoginService {
	public String confirmCredentials(Connection connection){ 
		 
		if (connection != null) {
			System.out.println("You made it, take control your database now!");
			Map session = ActionContext.getContext().getSession();
		    session.put("logged-in","true");
			return "success" ;
		} else {
			System.out.println("Failed to make connection!");
			return "error";
		}
		
	}

}
